export interface ProducerType {
  name: string
  college: string
  schoolId: string // 学工号
  avatar: string // 头像
  uid: string // 用户id
}

// 微场景介绍
export interface SceneIntroductionType {
  title: string; // 标题
  producer: ProducerType[]; // 出品人
  description: string; // 描述
}

// 阶段类型
export interface PhaseType {
  phaseId: string
  phaseTitle: string
  introduction?: string
  phaseTarget?: string
  phaseScore?: number
  sortOrder: number
  isOff?: boolean // 是否下架删除
  isNew?: boolean // 是否为新阶段
}

// 具体任务（任务资源和作业评价单独处理）
export interface SubTaskType {
  subPhaseId: string; // 任务id
  subPhaseTitle: string; // 任务标题
  introduction: string; // 任务介绍
  subPhaseTarget: string; // 任务目标
  subPhaseWorkRequirement: string; // 任务要求
}

// 评价（阶段权重，阶段作品，任务评价）
export interface EvaluationType {
  totalScore: number; // 总分
  gainedScore: number; // 已得分
  homeworkComment?: string; // 作业评价(阶段权重时为空)
}

// 图文资源卡片
export interface ResourceCardType {
  resourceId: string; // 资源id
  resourceTitle: string; // 资源标题
  resourceDescription: string; // 资源描述
  resourceImage: string; // 资源图片
  resourceUrl: string; // 资源链接
}

// 作业资源卡片
export interface HomeworkCardType {
  opusId: string; // 作业id
  opusTitle: string; // 作业标题
  introduction?: string; // 作业介绍
  score?: number; // 作业得分
  remark?: string; // 作业评语
  commitTime?: string; // 创建时间
  homeworkLabel?: string[]; // 作业标签
  homeworkImage?: string; // 作业封面
  homeworkUrl?: string; // 作业链接
}

// 专区基本信息
export interface AreaFakeType {
  areaId: string;
  areaName: string;
  areaIntroduction: string;
  areaCoverImage: string;
}

export interface AreaScene {
  sceneId: string;
  sceneTitle: string;
  introduction: string;
  coverUrl: string;
  areaId: string;
  authors: [];
  reward: string;
  tags: string[];
  achievement: string[];
  startTime: string;
  endTime: string;
}

export interface Dynamic {
  dynamicId: string;
  dynamicContent: string;
  dynamicTime: string;
  dynamicUserName: string;
  dynamicUserImage: string;
  dynamicUserStatus: string;
  dynamicUserMajor: string;
}

export interface AreaActivity {
  activityId: string,
  activityTitle: string,
  areaId: string,
  authors: string,
  coverUrl: string,
  introduction: string,
  tags: string[],
  targetUrl: string,
}

export interface AreaCourse {
  courseId: string,
  coverUrl: string,
  courseTitle: string,
  introduction: string,
  authors: string,
  areaId: string,
  targetUrl: string,
  tags: string[],
}

export interface AreaProject {
  projectId: string,
  projectTitle: string,
  areaId: string,
  authors: Array<{ userId: string; }>,
  coverUrl: string,
  introduction: string,
  tags: string[],
  targetUrl: string,
}

export interface SceneAuthor {
  sceneId: string;
  sceneName: string;
  userId: string;
  userName: string | null;
  userImageUrl: string | null;
  userCollege: string | null;
  updatedTime: string;
}

export interface UserDetail {
  userId: string;
  username: string | null;
  password: string | null;
  schoolName: string;
  schoolId: string;
  nickname: string;
  email: string;
  createdAt: string | null;
  userIntroduction: string;
  userImage: string;
  userCollege: string;
  realname: string;
  sex: string;
  userGrade: string | null;
  userMajor: string;
  userMobile: string;
  userCover: string;
  userType: string;
  lastLoginAt: string;
  userCampus: string | null;
  studentStatus: string | null;
  enrollmentYear: string | null;
}

export interface SceneAuthorDetail {
  userId: string;
  username: string | null;
  schoolName: string;
  schoolId: string | null;
  nickname: string;
  email: string;
  userIntroduction: string | null;
  userImage: string | null;
  userCollege: string | null;
  realname: string | null;
  sex: string | null;
  userGrade: string | null;
  userMajor: string | null;
  userType: string;
  lastLoginAt: string | null;
}

export interface LearningDynamicType {
  user: UserDetail;
  sceneId: string;
  sceneTitle: string;
  startTime: string;
}

export interface ScoreBoardItem {
  user: {
    userId: string;
    realname: string;
    userImage: string;
    userCollege: string;
  };
  score: number;
}

export interface AreaOpus {
  phaseOpusId: string,
  progressId: string,
  userId: string,
  opusTitle: string,
  introduction: string,
  coverUrl: string,
  opusFileName: string,
  opusUrl: string,
  commitTime: string,
  score: number,
  remark: string,
  tags: string[]
}

export interface AreaAchievement {
  resultId: string,
  resultTitle: string,
  areaId: string,
  coverUrl: string,
  introduction: string,
}

export interface Area {
  areaId: string;
  areaName: string;
  introduction: string;
  coverUrl: string;
}

export interface AreaWithTags {
  areaId: string;
  areaName: string;
  introduction: string;
  coverUrl: string;
  tags: string[];
}
